<ng-container [formGroup]="group">

    <div class="btn-group btn-group-toggle" data-toggle="buttons"
         [formGroupName]="model.id"
         [id]="id"
         [ngClass]="getClass('element', 'control')">

        <label *ngFor="let checkboxModel of model.group" ngbButtonLabel
               [hidden]="checkboxModel.hidden"
               [ngClass]="getClass('element', 'control', checkboxModel)">

            <input type="checkbox" ngbButton
                   [checked]="checkboxModel.checked"
                   [formControlName]="checkboxModel.id"
                   [id]="getCheckboxId(checkboxModel)"
                   [name]="checkboxModel.name"
                   [required]="checkboxModel.required"
                   [tabindex]="checkboxModel.tabIndex"
                   [value]="checkboxModel.value"
                   (blur)="onBlur($event)"
                   (change)="onCheckboxChange($event, checkboxModel)"
                   (focus)="onFocus($event)"/><span [ngClass]="getClass('element', 'label', checkboxModel)"
                                                    [innerHTML]="checkboxModel.label"></span></label>
    </div>

</ng-container>
